<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>选择器 All</title>
</head>
<body>
<div class="box">盒子1</div>
<div class="box">盒子2</div>
<div id="nav">
  <ul>
    <li>首页</li>
    <li>产品</li>
  </ul>
</div>
<script>
  // 3. querySelectorAll()返回指定选择器的所有元素对象集合
  const allBox = document.querySelectorAll('.box');
  console.log(allBox);
  const lis = document.querySelectorAll('li');
  console.log(lis);
</script>
</body>
</html>

